{% extends 'pc/forum.html' %}
{% load static %}
{% block title %}
论坛社区-{{type.name }}
{% endblock %}
{% block keywords %}
论坛社区|冯金琪,问题求助、代码、技术分享、综合讨论、求职招聘，js,js学习,Vue,React,前端学习,后台学习,服务器学习教程,数据库,mysql等学习,Java学习，ssh框架,PHP学习等，技术交流社区博客
{% endblock %}
{% block desc %}
论坛社区|冯金琪-技术交流社区博客,欢迎大家加入本站，本站是纯IT技术交流学术网站,在这里大家可以技术交流学习,发布文章,发布教程，一起学习成长，问题求助、代码、技术分享、综合讨论，在这里你可以进行技术分享、帮助别人解决问题。求职招聘，网站反馈等
{% endblock %}
{% block childer %}
 <div style="background: #fff;">
            <div class="f-name">
                <span class="active">最新帖子>>{{type.name  }}</span>
            </div>

            <ul class="list">
                {% for foo in people.object_list %}
                    <li class="clearfix">
                        <img src="{% if foo.authors.user_imag %}
                    {{ MEDIA_URL }}{{ foo.authors.user_imag }}
                    {% elif foo.authors.user_image %}
                    {{ foo.authors.user_image }}
                    {% else %}
                    {% static 'img/pc-icon.png' %}
                    {% endif %}" class="user fl" title="{{ foo.authors.username }}"width="40px">
                    <div class="list-text fl">
                        <p class="forun-title"><a href="{% url 'forum:detail' foo.id %}">{{ foo.title }}</a></p>
                        <p class="forun-info">来自于 {{ foo.category.name }}  {{ foo.add_time }} </p>
                    </div>
                    <div class="fr flex forun-num">
                        <div>评论{{ foo.get_number }}</div>
                        <div>浏览{{ foo.click_nums }}</div>
                    </div>
                    </li>
                    {% empty %}
                     <li style="margin: 10px 0">...暂无帖子</li>
                {% endfor %}
            </ul>

            {% if people.object_list.count >= 1 %}
        <div class="pageturn"style="padding: 15px">
           <ul class="pagination">
{#               <li><a href="/index">首页</a></li>#}
               {% if people.has_previous %}
                   <li class="long"><a href="?{{ people.previous_page_number.querystring }}" class="prev">上一页</a></li>
               {% else %}
                   <li class="long"><span class="disabled prev btn"disabled="">上一页</span></li>
               {% endif %}
               {% for page in people.pages %}
                   {% if page %}
                       {% ifequal page people.number %}
                           <li class="active"><a href="?{{ page.querystring }}">{{ page }}</a></li>
                       {% else %}
                           <li><a href="?{{ page.querystring }}" class="page">{{ page }}</a></li>
                       {% endifequal %}
                   {% else %}
                       <li><span class="disabled  btn" disabled="">...</span></li>
                   {% endif %}
               {% endfor %}
               {% if people.has_next %}
                   <li class="long"><a href="?{{ people.next_page_number.querystring }}" class="next"> 下一页</a></li>
               {% else %}
                   <li class="long"><span class="disabled next btn"disabled=""> 下一页</span></li>
               {% endif %}
{#               <li><a href="?page={{ article.paginator.num_pages }}">尾页</a></li>#}
               <li class="hrefto">跳转到<input type="text"class="form-control" name="page"></li>
           </ul>

            当前{{ people.number }}/总共{{ people.paginator.num_pages }}页
       </div>
    {% endif %}

        </div>
{% endblock %}